<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <button @click="clickHandler">Click Me</button>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  components: {
    HelloWorld
  },
  data:{
    dog: {}
  },
  
  methods: {
    clickHandler () {
      // 该 name 属性是否是响应式的
      this.$set(this.data.dog, 'name', 'Husky')
      // this.dog.name = 'Trump'
      
    }
  }
}
</script>
